<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--服务商管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" href="__STATIC_URL__/static/css/addmchat.css"/>
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrapSwitch.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/core1.css?v=8"/>
    <link rel="stylesheet" type="text/css" href="/momachbid.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/setmachbank.css"/>

    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/js/bootstrapSwitch.js"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/layer/layer.js"></script>
    <script src="__STATIC_URL__/static/js/distpicker/distpicker.data.js?v=3"></script>
    <script src="__STATIC_URL__/static/js/distpicker/distpicker.js"></script>
    <script src="__STATIC_URL__/static/laydate/laydate.js"></script>
    <script src="/static/machtobank.js"></script>
    <script src="/whangye.js"></script>
</head>
<script>

    $(document).ready(function () {
        if (location.hash) {
            console.log(location.hash);
            $('a[href=' + location.hash + ']').tab('show');
        }
        $(document.body).on("click", "a[data-toggle]", function (event) {
            location.hash = this.getAttribute("href");
        });
    });
    $(window).on('popstate', function () {
        var anchor = location.hash || $("a[data-toggle=tab]").first().attr("href");
        $('a[href=' + anchor + ']').tab('show');
    });
</script>
<style>
    .uploadImg p label .fdj {
        background: url(__STATIC_URL__/static/img/eye.png) center center no-repeat;
    }

    .uploadImg p label .delSingle {
        background: url(__STATIC_URL__/static/img/delete.png) center center no-repeat;
    }
</style>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading">
            <ul class="breadcrumb mgl15 mgr15">
                <li>当前位置是:</li>
                <li>
                    <a href="javascript:history.back();">商户管理</a>
                </li>
                <li>
                    进件银行通道配置修改
                </li>
            </ul>
        </div>

        <div class="panel panel-default mgl15 mgr15">
            <div class="panel-heading addCharts" style="background:#ededed;">进件银行通道配置修改</div>
            <div class="panel-body">
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active" role="presentation" id="jichus"><a href="#jichu" data-toggle="tab">商户基本信息</a>
                    </li>
                    <li class="" role="presentation" id="contactss"><a href="#contacts" data-toggle="tab">结算信息</a></li>
                    <!--<li class="" role="presentation" id="banks"><a href="#bank" data-toggle="tab">银行账户信息</a></li>-->
                    <!--<li class="" role="presentation" id="wxalis"><a href="#wxali" data-toggle="tab">微信、支付宝支付信息</a></li>-->
                    <!--<li class="" role="presentation" id="uploads"><a href="#upload" data-toggle="tab">上传证件照</a></li>-->
                    <!--<li class="" role="presentation" id="activitys"><a href="#activity" data-toggle="tab">餐饮特惠活动</a></li>-->
                </ul>
                <div id="myTabContent" class="tab-content" style="padding-top:15px;">

                    <div class="tab-pane fade in active" id="jichu">
                        <form class="form-horizontal adminex-form" action="" method="post" id="mach" name="form"
                              enctype="multipart/form-data">

                            <!--进价--->
                            <div class="pageBar">
                                <div class="tab">
                                    <a class="tabtitle">进件资料</a>
                                </div>
                            </div>
                            <div class="bgctitle ">
                                <span></span>商户基本信息
                            </div>
                            <div class="addinput">

                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册名称：</label>
                                    <div class="col-sm-10">
                                        <input type="hidden" name="id" value="{$info['id']}">
                                        <input type="hidden" name="merchClass" value="{$info['merchClass']}" id="merchClass">
                                        <input type="text" class="form-control" id="merchName"
                                               value="{$info['merchName']}" name="merchName">
                                        <div id="" class="error"></div>
                                        <div class="titlecont">1.填写营业执照上面的商户名称。2.个体商户填写商户简称</div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户简称：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" value="{$info['merchShortName']}"
                                               id="merchShortName" name="merchShortName">
                                        <div id="" class="error"></div>
                                        <div class="titlecont">简称格式：地区+商户名称+行业</div>

                                    </div>
                                </div>

                            </div>
                            <div class="bgctitle ">
                                <span></span>商户详细信息
                            </div>
                            <div class="addinput">
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册地：</label>
                                    <div class="col-sm-10">
                                        <div class="input-group" id="distpicker1">
                                            <select class="form-control" id="regProvId" name="regProvId">

                                            </select>
                                            <select class="form-control" name="regCityId" id="regCityId">

                                            </select>
                                            <select class="form-control" name="regAreaId" id="regAreaId">

                                            </select>
                                            <div id="error13" class="error"></div>
                                        </div>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>

                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册详细地址：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="regAddr" value="{$info['regAddr']}"
                                               name="regAddr">
                                        <div id="" class="error"></div>
                                        <div class="titlecont">填写商户实际的注册详细地址</div>

                                    </div>
                                </div>


                                <div class="form-group merchClass1">
                                    <label class="col-sm-2 col-sm-2 control-label">是否三证合一：</label>
                                    <div class="col-sm-10">
                                        <input type="hidden" name="isCreditCode" value="{$info['isCreditCode']}"
                                               class="isCreditCode">
                                        <div class="switch switch-small" data-animated="true" id="isCreditCode"
                                             data-on-label="是" data-off-label="否">
                                            <input type="checkbox"  {if condition="$info['isCreditCode'] eq '1'" }checked{/if}/>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group merchClass1 isCreditCode1" id="" {if condition="$info['isCreditCode'] eq '0'" }style="display:none;" {/if} >
                                <label class="col-sm-2 col-sm-2 control-label">统一社会信用代码证：</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" value="{$info['creditCode']}"
                                           id="creditCode" name="creditCode">
                                    <div id="" class="error"></div>
                                    <div class="titlecont"></div>

                                </div>
                            </div>
                            <div class="form-group  isCreditCode2" id="" {if condition="$info['isCreditCode'] eq '1'" }style="display:none;" {/if}>
                            <label class="col-sm-2 col-sm-2 control-label">营业执照编号：</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" value="{$info['regCode']}" id="regCode"
                                       name="regCode">
                                <div id="" class="error"></div>
                                <div class="titlecont"></div>

                            </div>
                    </div>

                    <div class="form-group" id="">
                        <label class="col-sm-2 col-sm-2 control-label"><span
                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>证照有效期：</label>
                        <div class="col-sm-10">
                            <select class="form-control" style="" id="licType" name="licType" onchange="merchc('licType');">
                                <option value="">请选择</option>
                                <option value="1" {if condition="$info['licType'] eq '1'" }selected{/if}>非长期</option>
                                <option value="2" {if condition="$info['licType'] eq '2'" }selected{/if}>长期</option>
                            </select>
                            <div id="" class="error"></div>
                            <div class="titlecont"></div>
                        </div>
                    </div>
                    <div class="form-group" id="">
                        <label class="col-sm-2 col-sm-2 control-label">证照开始日期：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" value="{$info['licSdate']}" id="licSdate" name="licSdate">
                            <div id="" class="error"></div>
                            <div class="titlecont">日期格式要求：20180115</div>

                        </div>
                    </div>
                    <div class="form-group licType1" {if condition="$info['licType'] eq '2'" }style="display:none;" {/if}>
                    <label class="col-sm-2 col-sm-2 control-label">证照结束日期：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="licEdate" value="{$info['licEdate']}"
                               name="licEdate">
                        <div id="" class="error"></div>
                        <div class="titlecont">日期格式要求：20180115</div>

                    </div>
                </div>
                <div class="form-group isCreditCode2" {if condition="$info['isCreditCode'] eq '1'" }style="display:none;" {/if}>
                <label class="col-sm-2 col-sm-2 control-label">组织机构代码证：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="orgCode" value="{$info['orgCode']}" name="orgCode">
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>


        </div>
        <div class="bgctitle ">
            <span></span>法人信息
        </div>


        <div class="form-group " id="">
            <label class="col-sm-2 col-sm-2 control-label"><span
                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人：</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="contactName" value="{$info['contactName']}"
                       name="contactName">

                <div id="" class="error"></div>
                <div class="titlecont">商户法人姓名.支持少数名族，最大支持15个汉字</div>

            </div>
        </div>
        <div class="form-group" id="">
            <label class="col-sm-2 col-sm-2 control-label"><span
                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件类型：</label>
            <div class="col-sm-10">
                <select class="form-control" style="" id="contactIdType" name="contactIdType">
                    <option value="">请选择</option>
                    <option value="01" {if condition="$info['contactIdType'] eq '01'" }selected{/if}>身份证</option>
                    <option value="02" {if condition="$info['contactIdType'] eq '02'" }selected{/if}>护照</option>
                    <option value="04" {if condition="$info['contactIdType'] eq '04'" }selected{/if}>军官证</option>
                    <option value="03" {if condition="$info['contactIdType'] eq '03'" }selected{/if}>港澳台通行证</option>
                    <option value="05" {if condition="$info['contactIdType'] eq '05'" }selected{/if}>回乡证</option>
                    <option value="06" {if condition="$info['contactIdType'] eq '06'" }selected{/if}>工商登记号</option>
                    <option value="09" {if condition="$info['contactIdType'] eq '09'" }selected{/if}>其他</option>
                </select>
                <div id="" class="error"></div>
                <div class="titlecont"></div>

            </div>
        </div>
        <div class="form-group" id="">
            <label class="col-sm-2 col-sm-2 control-label"><span
                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件号码：</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="contactIdNo" value="{$info['contactIdNo']}"
                       name="contactIdNo">
                <div id="" class="error"></div>
                <div class="titlecont"></div>

            </div>
        </div>
        <div class="form-group" id="">
            <label class="col-sm-2 col-sm-2 control-label"><span
                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件有效期：</label>
            <div class="col-sm-10">
                <select class="form-control" id="contactIdValidType" name="contactIdValidType"
                        onchange="merchc('contactIdValidType');">
                    <option value="">请选择</option>
                    <option value="1" {if condition="$info['contactIdValidType'] eq '1'" }selected{/if}>非长期</option>
                    <option value="2" {if condition="$info['contactIdValidType'] eq '2'" }selected{/if}>长期</option>

                </select>
                <div id="" class="error"></div>
                <div class="titlecont"></div>

            </div>
        </div>
        <div class="form-group" id="">
            <label class="col-sm-2 col-sm-2 control-label"><span
                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件有效期开始日期：</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" value="{$info['contactIdSdate']}" id="contactIdSdate"
                       name="contactIdSdate">

                <div id="" class="error"></div>
                <div class="titlecont">日期格式要求：20180115</div>

            </div>
        </div>
        <div class="form-group contactIdValidType1" id="" {if condition="$info['contactIdValidType'] eq '2'" }style="display:none;" {/if}>
        <label class="col-sm-2 col-sm-2 control-label">商户法人证件有效期结束日期：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" value="{$info['contactIdEdate']}" id="contactIdEdate"
                   name="contactIdEdate">

            <div id="" class="error"></div>
            <div class="titlecont">日期格式要求：20180115</div>

        </div>
    </div>
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label"><span class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人手机号：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" value="{$info['contactTelno']}" id="contactTelno"
                   name="contactTelno">

            <div id="" class="error"></div>
            <div class="titlecont"></div>

        </div>
    </div>
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label"><span class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人邮箱：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" value="{$info['contactEmail']}" id="contactEmail"
                   name="contactEmail">

            <div id="" class="error"></div>
            <div class="titlecont"></div>

        </div>
    </div>

    <div class="bgctitle ">
        <span></span>上传证件照
    </div>
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label">营业执照：</label>
        <div class="col-sm-10 upimglist fl mwth380">
            <div class="uploadImg fl">
                                        <span class="fileBox">
                                            <input class="addImg upload" type="file" id="file0" name="file"
                                                   onchange="upload(this,'archFlph01','file0img')">
                                        </span>
                <input type="hidden" class="form-control inputimg" value="{$info['archFlph01']}" id="archFlph01"
                       name="archFlph01">

                <img src="{$info['archFlph01']}" class="showImg file0img">

                <p class="showImg">
                    <label class="opearte">
                        <a href="javascript:" class="fdj" data-img="{$info['archFlph01']}">
                        </a>
                        <a href="javascript:" class="delSingle">
                        </a>
                    </label>
                </p>
                <div class="imgtitle">
                    营业执照
                </div>
            </div>

            <div id="" class="error"></div>
            <div class="titlecont">企业商户必填，格式：数字+数字，如1_1,表示第一个商户的营业执照照片，与zip包中的图片名称对应。</div>

        </div>
    </div>
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label">开户许可证：</label>
        <div class="col-sm-10 upimglist fl mwth380">
            <div class="uploadImg fl">
                                        <span class="fileBox">
                                            <input class="addImg upload" type="file" id="file1" name="file"
                                                   onchange="upload(this,'archFlph04','file1img')">
                                        </span>
                <input type="hidden" class="form-control inputimg" value="{$info['archFlph04']}" id="archFlph04"
                       name="archFlph04">

                <img src="{$info['archFlph04']}" class="showImg file1img">

                <p class="showImg">
                    <label class="opearte">
                        <a href="javascript:" class="fdj" data-img="{$info['archFlph04']}">
                        </a>
                        <a href="javascript:" class="delSingle">
                        </a>
                    </label>
                </p>
                <div class="imgtitle">
                    开户许可证
                </div>
            </div>

            <div id="" class="error"></div>
            <div class="titlecont">企业商户必填，格式：数字+数字，如1_1,表示第一个商户的开户许可证照片，与zip包中的图片名称对应。</div>

        </div>
    </div>
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label">法人身份证：</label>
        <div class="col-sm-5 upimglist fl mwth380">
            <div class="uploadImg fl">
                                        <span class="fileBox">
                                            <input class="addImg upload" type="file" id="file3" name="file"
                                                   onchange="upload(this,'archFlph05','file2img')">
                                        </span>
                <input type="hidden" class="form-control inputimg" value="{$info['archFlph05']}" id="archFlph05"
                       name="archFlph05">

                <img src="{$info['archFlph05']}" class="showImg file2img">

                <p class="showImg">
                    <label class="opearte">
                        <a href="javascript:" class="fdj" data-img="{$info['archFlph05']}">
                        </a>
                        <a href="javascript:" class="delSingle">
                        </a>
                    </label>
                </p>
                <div class="imgtitle">
                    法人身份证正面
                </div>

            </div>
            <div class="uploadImg fl">
                                        <span class="fileBox">
                                            <input class="addImg upload" type="file" id="file4" name="file"
                                                   onchange="upload(this,'archFlph06','file3img')">
                                        </span>
                <input type="hidden" class="form-control inputimg" value="{$info['archFlph06']}" id="archFlph06"
                       name="archFlph06">

                <img src="{$info['archFlph06']}" class="showImg file3img">

                <p class="showImg">
                    <label class="opearte">
                        <a href="javascript:" class="fdj" data-img="{$info['archFlph06']}">
                        </a>
                        <a href="javascript:" class="delSingle">
                        </a>
                    </label>
                </p>
                <div class="imgtitle">
                    法人身份证反面
                </div>

            </div>

            <div id="" class="error"></div>
            <div class="titlecont">企业商户必填，格式：数字+数字，如1_1,表示第一个商户的法人身份证正反面照片，与zip包中的图片名称对应。</div>

        </div>


    </div>

    <div class="addinput tab-pane " id="wxali">
        <div class="bgctitle ">
            <span></span>微信、支付宝支付信息
        </div>
        <!--<div class="form-group">-->
        <!--<label class="col-sm-2 col-sm-2 control-label"><span-->
        <!--class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否开通微信支付：</label>-->
        <!--<div class="col-sm-10">-->
        <!--<div class="switch switch-small" data-animated="true" id="auth18" data-on-label="是" data-off-label="否">-->
        <!--<input type="checkbox" disabled name="auth18" value="{$info['auth18']}" class="auth18" {if condition="$info['auth18'] eq '1'"}checked{/if}/>-->

        <!--</div>-->
        <!--<div class="titlecont"></div>-->

        <!--</div>-->
        <!--</div>-->

        <!--<div class="form-group auth181" id="" {if condition="$info['auth18'] eq '0'"}style="display:none"{/if}>-->
        <!--<label class="col-sm-2 col-sm-2 control-label">商户经营类目：</label>-->
        <!--<div class="col-sm-10" >-->
        <!--<div class="input-group" id="selectItem">-->
        <!--<input type="hidden" class="form-control" id="wechatCateCode" name="wechatCateCode">-->
        <!--<select class="form-control province" disabled id="primary" name="leibie">-->

        <!--</select>-->
        <!--<select class="form-control city" disabled name="leibie2" id="secondary">-->

        <!--</select>-->
        <!--<select class="form-control county" disabled name="leibie3" id="Third" onchange="wechat(this);">-->

        <!--</select>-->
        <!--</div>-->

        <!--<div id="" class="error"></div>-->
        <!--<div class="titlecont">开通微信支付业务时必填。</div>-->

        <!--</div>-->
        <!--</div>-->

        <div class="form-group auth181" id="" {if condition="$info['auth18'] eq '0'" }style="display:none" {/if}>
        <label class="col-sm-2 col-sm-2 control-label">微信支付手续费（%）：</label>
        <div class="col-sm-10">
            <input type="hidden" value="{$info['auth18']}" id="auth18">
            <input type="text" class="form-control" id="fee08" value="{$info['fee08']}" name="fee08">

            <div id="" class="error"></div>
            <div class="titlecont">开通微信支付业务时必填。手续费保留小数点后4位。如：0.5533</div>

        </div>
    </div>

    <!--<div class="form-group auth191" id="" {if condition="$info['auth19'] eq '0'"}style="display:none"{/if}>-->
    <!--<label class="col-sm-2 col-sm-2 control-label">商户经营类目（支付宝）：</label>-->
    <!--<div class="col-sm-10">-->
    <!--<select class="form-control" style="" disabled id="alipayCateCode" name="alipayCateCode">-->
    <!--<option value="">请选择</option>-->
    <!--<option value="2015050700000000"  {if condition="$info['auth19'] eq '2015050700000000'"}selected{/if}>美食</option>-->
    <!--<option value="2015091000052157" {if condition="$info['auth19'] eq '2015091000052157'"}selected{/if}>超市便利店</option>-->
    <!--<option value="2015062600004525" {if condition="$info['auth19'] eq '2015062600004525'"}selected{/if}>休闲娱乐</option>-->
    <!--<option value="2015062600002758" {if condition="$info['auth19'] eq '2015062600002758'"}selected{/if}>购物</option>-->
    <!--<option value="2016062900190124" {if condition="$info['auth19'] eq '2016062900190124'"}selected{/if}>爱车</option>-->
    <!--<option value="2015063000020189" {if condition="$info['auth19'] eq '2015063000020189'"}selected{/if}>生活服务</option>-->
    <!--<option value="2016042200000148" {if condition="$info['auth19'] eq '2016042200000148'"}selected{/if}>教育培训</option>-->
    <!--<option value="2016062900190296" {if condition="$info['auth19'] eq '2016062900190296'"}selected{/if}>医疗健康</option>-->
    <!--<option value="2015080600000001" {if condition="$info['auth19'] eq '2015080600000001'"}selected{/if}>航旅</option>-->
    <!--<option value="2016062900190337" {if condition="$info['auth19'] eq '2016062900190337'"}selected{/if}>专业销售/批发</option>-->
    <!--<option value="2016062900190371" {if condition="$info['auth19'] eq '2016062900190371'"}selected{/if}>政府/社会组织</option>-->

    <!--</select>-->
    <!--<div id="" class="error"></div>-->
    <!--<div class="titlecont">开通支付宝支付业务时必填。</div>-->

    <!--</div>-->
    <!--</div>-->
    <div class="form-group auth191" id="" {if condition="$info['auth19'] eq '0'" }style="display:none" {/if}>
    <label class="col-sm-2 col-sm-2 control-label">支付宝支付手续费（%）：</label>
    <div class="col-sm-10">
        <input type="hidden" value="{$info['auth19']}" id="auth19">
        <input type="text" class="form-control" value="{$info['fee12']}" id="fee12" name="fee12">

        <div id="" class="error"></div>
        <div class="titlecont">开通支付宝支付业务时必填。手续费保留小数点后4位。如：0.5533</div>

    </div>
    </div>
    <div class="form-group " id="wxid" style="display:none">
        <label class="col-sm-2 col-sm-2 control-label">微信小程序AppID：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="wxAppid" name="wxAppid" value="{$info['wxAppid']}">

            <div id="" class="error"></div>
            <div class="titlecont">开通微信小程序支付手续费业务时必填。</div>

        </div>
    </div>
    <div class="form-group auth191" id="" {if condition="$info['auth38'] eq '0'" }style="display:none" {/if}>
    <label class="col-sm-2 col-sm-2 control-label">微信小程序支付手续费（%）：</label>
    <div class="col-sm-10">
        <input type="hidden" value="{$info['auth38']}" id="auth38">
        <input type="text" class="form-control" value="{$info['fee33']}" id="fee33" name="fee12">

        <div id="" class="error"></div>
        <div class="titlecont">微信小程序支付手续费业务时必填。手续费保留小数点后4位。如：0.5533</div>

    </div>
    </div>
    <!--<div class="form-group">-->
    <!--<label class="col-sm-2 col-sm-2 control-label"><span-->
    <!--class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否开通支付宝支付：</label>-->
    <!--<div class="col-sm-10">-->
    <!--<div class="switch switch-small" data-animated="true" id="auth19" data-on-label="是" data-off-label="否">-->
    <!--<input type="checkbox" name="auth19" disabled value="{$info['auth19']}" class="auth19" {if condition="$info['auth19'] eq '1'"}checked{/if}/>-->

    <!--</div>-->
    <!--<div class="titlecont"></div>-->

    <!--</div>-->
    <!--</div>-->
    <div class="form-group" id="">
        <label class="col-sm-2 col-sm-2 control-label"><span class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算周期：</label>
        <div class="col-sm-10">
            <select class="form-control" id="settleTerm" name="settleTerm" onchange="merchc('settleTerm');">
                <option value="1" {if condition="$info['settleTerm'] eq '1'" }selected{/if}>T+1</option>
                <option value="2" {if condition="$info['settleTerm'] eq '2'" }selected{/if}>D+1</option>

            </select>
            <div id="" class="error"></div>
            <div class="titlecont"></div>

        </div>
    </div>
    <div class="form-group settleTerm2" {if condition="$info['settleTerm'] eq '1'" } style="display:none" {/if}>
    <label class="col-sm-2 col-sm-2 control-label">D+1结算手续费（%）：</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" value="{$info['fee01']}" id="fee01" name="fee01">

        <div id="" class="error"></div>
        <div class="titlecont"></div>

    </div>
    </div>
    </div>

    <input type="hidden" name="method" value="setmachinfo">

    <div class="panel-footer" style="text-align:center;margin-top:50px;">
        <button type="button" onclick="addform()" class="btn btn-primary">提交审核</button>

    </div>
    </form>

    </div>
    <div class="tab-pane fade" id="contacts">
        <form class="form-horizontal adminex-form" action="" method="post" id="tobank" name="form"
              enctype="multipart/form-data">

            <div class="bgctitle ">
                <span></span>银行账户信息
            </div>

            <input type="hidden" name="method" value="setbankinfo">

            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label"><span
                        class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账户类型：</label>
                <div class="col-sm-10">
                    <input type="hidden" name="id" value="{$info['id']}">
                    <select class="form-control" id="isPrivate" name="isPrivate" onchange="Private('isPrivate');">
                        <option value="">请选择</option>
                        <option value="0" {if condition="$info['isPrivate'] eq '0'" }selected{/if}>对公</option>
                        <option value="1" {if condition="$info['isPrivate'] eq '1'" }selected{/if}>对私</option>

                    </select>
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label"><span
                        class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账户名：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" value="{$info['bankActName']}" id="bankActName"
                           name="bankActName">

                    <div id="" class="error"></div>
                    <div class="titlecont">结算账户名称，对公结算时，结算账户名称需与商户注册名称一致</div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label"><span
                        class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账号：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" value="{$info['bankActId']}" id="bankActId"
                           name="bankActId">

                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label"><span
                        class="glyphicon glyphicon-asterisk glyphicon-tip"></span>银行所在地：</label>
                <div class="col-sm-10">
                    <div class="input-group" id="distpicker3">
                        <select class="form-control" id="bankProvId" name="bankProvId">

                        </select>
                        <select class="form-control" name="bankCityId" id="bankCityId">

                        </select>
                        <select class="form-control" name="bankAreaId" id="bankAreaId">

                        </select>
                        <div id="" class="error"></div>
                    </div>
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label"><span
                        class="glyphicon glyphicon-asterisk glyphicon-tip"></span>银行名称：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" value="{$info['bankName']}" id="bankName" name="bankName">

                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>

            <div class="isPrivate2" {if condition="$info['isPrivate'] eq '0'" }style="display:none" {/if}>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label">持卡人证件类型：</label>
                <div class="col-sm-10">
                    <select class="form-control" style="" id="accountIdType" name="accountIdType">
                        <option value="">请选择</option>
                        <option value="01" {if condition="$info['accountIdType'] eq '01'" }selected{/if}>身份证</option>
                        <option value="02" {if condition="$info['accountIdType'] eq '02'" }selected{/if}>护照</option>
                        <option value="04" {if condition="$info['accountIdType'] eq '04'" }selected{/if}>军官证</option>
                        <option value="03" {if condition="$info['accountIdType'] eq '03'" }selected{/if}>港澳台通行证</option>
                        <option value="05" {if condition="$info['accountIdType'] eq '05'" }selected{/if}>回乡证</option>
                        <option value="06" {if condition="$info['accountIdType'] eq '06'" }selected{/if}>工商登记号</option>
                        <option value="09" {if condition="$info['accountIdType'] eq '09'" }selected{/if}>其他</option>
                    </select>
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label">持卡人证件号码：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" value="{$info['accountIdNo']}" id="accountIdNo"
                           name="accountIdNo">
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期：</label>
                <div class="col-sm-10">
                    <select class="form-control" style="" id="accountIdValidType" name="accountIdValidType"
                            onchange="merchc('accountIdValidType');">
                        <option value="1" {if condition="$info['accountIdValidType'] eq '1'" }selected{/if}>非长期</option>
                        <option value="2" {if condition="$info['accountIdValidType'] eq '2'" }selected{/if}>长期</option>

                    </select>
                    <div id="" class="error"></div>
                    <div class="titlecont"></div>

                </div>
            </div>
            <div class="form-group" id="">
                <label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期开始日期：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" value="{$info['accountIdSdate']}" id="accountIdSdate"
                           name="accountIdSdate">

                    <div id="" class="error"></div>
                    <div class="titlecont">日期格式要求：20180115</div>

                </div>
            </div>
            <div class="form-group accountIdValidType1" id="" {if condition="$info['accountIdValidType'] eq '2'" }style="display:none;" {/if}>
            <label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期结束日期：</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" value="{$info['accountIdEdate']}" id="accountIdEdate"
                       name="accountIdEdate">

                <div id="" class="error"></div>
                <div class="titlecont">日期格式要求：20180115</div>

            </div>
    </div>

    </div>
    <div class="panel-footer" style="text-align:center;margin-top:50px;">
        <button type="button" onclick="addtobankform()" class="btn btn-primary">提交审核</button>

    </div>
    </form>
    </div>

    </div>


    </div>
    </div>
    {include file='public/footer'/}
    </div>
</section>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
                <img src="" alt="" id="img">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<script src="/static/cos-js-sdk-v5.js?v=" +Math.random()></script>
</body>
<script>
    var Bucket = 'payos-1251056009';
    var Region = 'ap-shanghai';
    var cos = new COS({
        getAuthorization: function (options, callback) {
            // 异步获取签名
            $.get('{:url()}', {
                bucket: options.Bucket,
                region: options.Region,
            }, function (data) {
                // console.log(data);

                callback({
                    TmpSecretId: data.credentials.tmpSecretId,
                    TmpSecretKey: data.credentials.tmpSecretKey,
                    XCosSecurityToken: data.XCosSecurityToken,
                    ExpiredTime: data.expiredTime,
                });
            });
        }
    });

    // 监听选文件
    function upload(obj, fid, img) {
        var data = Date.parse(new Date());
        var file = obj.files[0];
        // console.log(33, obj.files[0]);
        if (!file) return;

        // 分片上传文件
        cos.sliceUploadFile({
            Bucket: Bucket,
            Region: Region,
            Key: "/uploads/machtobank/" + data + file.name,
            Body: file
        }, function (err, data) {
            // console.log(err, data);

            // console.log(fid, img);
            $("#" + fid).val("https://file.wunengkeji.com/" + data.Key);
            $("." + img).attr("src", "https://file.wunengkeji.com/" + data.Key);
            $("." + img).next().removeClass("hide");
            $("." + img).next().find(".fdj").attr("data-img", "https://file.wunengkeji.com/" + data.Key);

        });

    };
</script>
<script>
    laydate.render({
        elem: '#licSdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date) {
            // console.log(value, date);
            var endtime = $("#licEdate").val();

            //转换时间
            var endtime = new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
            var starttime = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            // console.log(11, endtime, starttime);

            if (endtime <= starttime) {
                layer.alert("开始时间不可以大于结束时间");
                $("#licSdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#licEdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date, endDate) {
            // console.log(value, date);
            var starttime = $("#licSdate").val();

//转换时间
            var start = new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
            var end = new Date(value.replace("-", "/").replace("-", "/")).getTime();
//比较时间
//             console.log(11, start, end);

            if (end <= start) {
                layer.alert("结束时间不可以小于开始时间");
                $("#licEdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#contactIdSdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date) {
            // console.log(value, date);
            var endtime = $("#contactIdEdate").val();

            //转换时间
            var endtime = new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
            var starttime = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            // console.log(11, endtime, starttime);

            if (endtime <= starttime) {
                layer.alert("开始时间不可以大于结束时间");
                $("#contactIdSdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#contactIdEdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date, endDate) {
            // console.log(value, date);
            var starttime = $("#contactIdSdate").val();

//转换时间
            var start = new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
            var end = new Date(value.replace("-", "/").replace("-", "/")).getTime();
//比较时间
//             console.log(11, start, end);

            if (end <= start) {
                layer.alert("结束时间不可以小于开始时间");
                $("#contactIdEdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#accountIdSdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date) {
            // console.log(value, date);
            var endtime = $("#accountIdEdate").val();

            //转换时间
            var endtime = new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
            var starttime = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            // console.log(11, endtime, starttime);

            if (endtime <= starttime) {
                layer.alert("开始时间不可以大于结束时间");
                $("#accountIdSdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#accountIdEdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function (value, date, endDate) {
            // console.log(value, date);
            var starttime = $("#accountIdSdate").val();

//转换时间
            var start = new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
            var end = new Date(value.replace("-", "/").replace("-", "/")).getTime();
//比较时间
//             console.log(11, start, end);

            if (end <= start) {
                layer.alert("结束时间不可以小于开始时间");
                $("#accountIdEdate").val("");
            }
        }
    });
</script>

<script type="text/javascript">

    var province1 = "{$info['regProvId']}";
    var city1 = "{$info['regCityId']}";
    var district1 = "{$info['regAreaId']}";
    var province2 = "{$info['bankProvId']}";
    var city2 = "{$info['bankCityId']}";
    var district2 = "{$info['bankAreaId']}";

    $("#distpicker1").distpicker({
        province: province1,
        city: city1,
        district: district1,
        autoSelect: false
    });
    // $("#distpicker2").distpicker({
    //     province: "省",
    //     city: "市",
    //     district: "区/县",
    //     autoSelect: false
    // });
    $("#distpicker3").distpicker({
        province: province2,
        city: city2,
        district: district2,
        autoSelect: false
    });

</script>
<script type="text/javascript">
$(function(){
    var type="{$info['status']}";
    var auth38="{$info['auth38']}";
    var merchClass="{$info['merchClass']}";
    if(parseInt(type)==1){
        if(parseInt(auth38)==1){
            $("#wxid").attr("style","display:block");

        }
    }
    if(parseInt(merchClass)==2){
        $(".merchClass1").attr("style","display:none");
    }
})
</script>
<script>
    function addform() {
        // 商户注册名称
        var merchName = $("#merchName").val();
        //请输入商户注册名称
        if(merchName == "") {
            layer.alert("请输入商户注册名称", {
                icon: 7
            });
            $("#merchName").focus();
            return false;
        }
        //商户简称
        var merchShortName = $("#merchShortName").val();
        //请输入商户简称
        if(merchShortName == "") {
            layer.alert("请输入商户简称", {
                icon: 7
            });
            $("#merchShortName").focus();
            return false;
        }
        //商户注册地
        var regProvId = $("#regProvId").val();
        var regCityId = $("#regCityId").val();
        var regAreaId = $("#regAreaId").val();
        var regAddr = $("#regAddr").val();
        var merchClass=$("#merchClass").val();
        //是否三证合一
        var isCreditCode = parseInt($(".isCreditCode").val())
        //统一社会信用代
        var creditCode = $('#creditCode').val();
        //营业执照编号
        var regCode = $("#regCode").val();
        var orgCode = $("#orgCode").val();

        //证照开始日期

        var licType = $('#licType').val();
        var licSdate = $('#licSdate').val();
        var licEdate = $("#licEdate").val();
        //商户注册地
        if(regProvId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regProvId").focus();
            return false;
        }
        if(regCityId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regCityId").focus();
            return false;
        }
        if(regAreaId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regAreaId").focus();
            return false;
        }
        //商户注册详细地址
        if(regAddr == "") {
            layer.alert("请填写商户注册详细地址", {
                icon: 7
            });
            $("#regAddr").focus();
            return false;
        }
        // console.log(8778,isCreditCode,merchClass);
        if(merchClass == 1) {
            if (isCreditCode == 1) {
                if (creditCode == "") {
                    layer.alert("请填写统一社会信用代码证", {
                        icon: 7
                    });
                    $("#creditCode").focus();
                    return false;
                }

            } else {

                if (regCode == "") {
                    layer.alert("请填写营业执照编号", {
                        icon: 7
                    });
                    $("#regCode").focus();
                    return false;
                }
                if (orgCode == "") {
                    layer.alert("请填写组织机构代码证", {
                        icon: 7
                    });
                    $("#orgCode").focus();
                    return false;
                }
            }
        }
        // 法人信息
        var contactName = $("#contactName").val();
        // 法人证件号码
        var contactIdNo = $("#contactIdNo").val();
        //法人证件类型
        var contactIdType = $("#contactIdType").val();
        //法人证件有效期
        var contactIdValidType = $("#contactIdValidType").val();
        var contactIdSdate = $("#contactIdSdate").val();
        var contactIdEdate = $("#contactIdEdate").val();
        //法人手机号
        var contactTelno = $("#contactTelno").val();
        //法人邮箱
        var contactEmail = $('#contactEmail').val();
//法人
        if(contactName == "") {
            layer.alert("请填写法人", {
                icon: 7
            });
            $("#contactName").focus();
            return false;
        }
        if(contactIdType == "") {
            layer.alert("请选择法人证件类型", {
                icon: 7
            });
            $("#contactIdType").focus();
            return false;
        }
        if(contactIdNo == "") {
            layer.alert("请填写法人证件号码", {
                icon: 7
            });
            $("#contactIdNo").focus();
            return false;
        }
        if(contactIdValidType !== "") {
            if(contactIdValidType == 1) {
                if(contactIdEdate == "") {
                    layer.alert("请填写法人证件有效期结束日期", {
                        icon: 7
                    });
                    $("#contactIdEdate").focus();
                    return false;
                }
            }
        } else {
            layer.alert("请选择法人证件有效期", {
                icon: 7
            });
            $("#contactIdValidType").focus();
            return false;
        }
        if(contactIdSdate == "") {
            layer.alert("请填写法人证件有效期开始日期", {
                icon: 7
            });
            $("#contactIdSdate").focus();
            return false;
        }
        if(contactTelno == "") {
            layer.alert("请填写法人手机号", {
                icon: 7
            });
            $("#contactTelno").focus();
            return false;
        }
        if(contactEmail == "") {
            layer.alert("请填写法人邮箱", {
                icon: 7
            });
            $("#contactEmail").focus();
            return false;
        }
        // 开通微信支付
        var auth18 = $('.auth18').val();
        var fee08 = $('#fee08').val();
        var auth19 = $('.auth19').val();
        var fee12 = $('#fee12').val();
        // 开通微信小程序支付
        var auth38 = $('.auth38').val();
        var fee33 = $('#fee33').val();
        // 是否开通微信支付
        if(auth18 == 1) {

            if(fee08 == "") {
                layer.alert("请填写微信支付手续费", {
                    icon: 7
                });
                return false;
            }
        }
        // 开通支付宝支付
        if(auth19 == 1) {


            if(fee12 == "") {
                layer.alert("请填写支付宝支付手续费", {
                    icon: 7
                });
                return false;
            }

        }
        if(auth38 == 1) {

            if(fee33 == "") {
                layer.alert("请填写微信小程序手续费", {
                    icon: 7
                });
                return false;
            }

        }
        var settleTerm=$("#settleTerm").val();
        var fee01=$("#fee01").val();
        // 结算周期
        if(settleTerm == 2) {
            if(fee01 == "") {
                layer.alert("请填写D+1结算手续费", {
                    icon: 7
                });
                $("#fee01").focus();
                return false;
            }

        }
        $.ajax({
            url: "{:url('')}",
            data: $('#mach').serialize(),
            dataType: "json",
            type: "post",
            success: function (res) {

                // console.log(999, res);
                var url = res;
                if (res.result_code == "FAIL") {
                    layer.msg(res.result_msg);
                } else {
                    layer.msg(res.result_msg);
                }
                // window.location.href=res;
            }
        })

    }

    function addtobankform() {
        // 结算账户类型
        var isPrivate = $("#isPrivate").val();
        //结算账户名
        var bankActName = $('#bankActName').val();
        // 结算账号
        var bankActId = $("#bankActId").val();
        //结算账户名
        var bankActName = $('#bankActName').val();
        // 银行所在地
        var bankProvId = $("#bankProvId").val();
        var bankCityId = $("#bankCityId").val();
        var bankAreaId = $("#bankAreaId").val();
        //银行名称
        var bankName = $('#bankName').val();
        //持卡人证件
        var accountIdType = $('#accountIdType').val();
        var accountIdNo = $('#accountIdNo').val();

        var accountIdValidType = $('#accountIdValidType').val();

        var accountIdSdate = $('#accountIdSdate').val();

        var accountIdEdate = $('#accountIdEdate').val();

        if(isPrivate == 1) {

            if(accountIdType == ""){
                layer.alert("请选择持卡人证件类型",{icon:7});
                $("#accountIdType").focus();
                return false;
            }
            if(accountIdNo == ""){
                layer.alert("请填写持卡人证件号码",{icon:7});
                $("#accountIdNo").focus();
                return false;
            }

            if(accountIdValidType==2){
                if(accountIdSdate == ""){
                    layer.alert("请填写持卡人证件有效期开始日期",{icon:7});
                    $("#accountIdSdate").focus();
                    return false;
                }

            }else if(accountIdValidType==1){
                if(accountIdEdate == ""){
                    layer.alert("持卡人证件有效期结束日期",{icon:7});
                    $("#accountIdEdate").focus();
                    return false;
                }
                if(accountIdSdate == ""){
                    layer.alert("请填写持卡人证件有效期开始日期",{icon:7});
                    $("#accountIdSdate").focus();
                    return false;
                }
            }

        } else if(isPrivate == "") {

            layer.alert("请选择结算账户类型", {
                icon: 7
            });
            $("#isPrivate").focus();
            return false;

        }
        if(bankActName == "") {
            layer.alert("请填写结算账户名", {
                icon: 7
            });
            $("#bankActName").focus();
            return false;
        }
        if(bankActId == "") {
            layer.alert("请填写结算账号", {
                icon: 7
            });
            $("#bankActId").focus();
            return false;
        }
        if(bankProvId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankProvId").focus();
            return false;
        }
        if(bankCityId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankCityId").focus();
            return false;
        }
        if(bankAreaId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankAreaId").focus();
            return false;
        }
        if(bankName == "") {
            layer.alert("请填写银行名称", {
                icon: 7
            });
            $("#bankName").focus();
            return false;
        }

        $.ajax({
            url: "{:url('')}",
            data: $('#tobank').serialize(),
            dataType: "json",
            type: "post",
            success: function (res) {

                // console.log(999, res);
                var url = res;
                if (res.result_code == "FAIL") {
                    layer.msg(res.result_msg);
                } else {
                    layer.msg(res.result_msg);
                }
                // window.location.href=res;
            }
        })
    }
</script>
<script>
    (function ($, window, document, undefined) {
        $.fn.showCity = function (opt) {
            this.defaults = {
                'cityjson': cityjson,     //json字符串变量名
                'defaultShow': false,        //市、县是否显示,默认不显示
                'showCounty': true,         //是否显示县
                'defaultCity': [0, 0, 0]       //默认城市，对应id
            };
            this.options = $.extend({}, this.defaults, opt);

            var oCityJson = eval(this.options.cityjson),

                oProvince = $('.province', this),
                oCity = $('.city', this),
                oCounty = $('.county', this),
                provinces = oCityJson.province,
                citys = oCityJson.city,
                countys = oCityJson.county;

            //创建省
            this.creatProvince = function () {
                var html = '';
                for (var i = 0; i < provinces.length; i++) {
                    html += '<option value=' + provinces[i].id + '>' + provinces[i].name + '</option>';
                }
                oProvince.append(html);
            };

            this.creat = function () {
                oProvince.html('<option value="0">请选择</option>');
                this.creatProvince();
                if (this.options.defaultShow) {
                    oCity.show();
                    oCounty.show();
                    oCity.html('<option value="0">请选择</option>');
                    oCounty.html('<option value="0">请选择</option>');
                }
                ;
                this.defaultCity();
                this.checkProvince();
                // console.log(999, this.options.showCounty);
                if (this.options.showCounty) {
                    this.checkCounty();
                }
            };

            //默认城市
            this.defaultCity = function () {
                if (this.options.defaultCity.toString() == '0,0,0') {
                    return;
                }
                ;

                var optionsCity = '';
                for (var i = 0; i < provinces.length; i++) {
                    if (provinces[i].id == this.options.defaultCity[0]) {
                        oProvince.val(provinces[i].id);
                        for (var j = 0; j < citys.length; j++) {
                            if (citys[j].cid == provinces[i].id) {
                                optionsCity += '<option value=' + citys[j].id + '>' + citys[j].name + '</option>'
                            }
                        }
                        oCity.append(optionsCity).show();
                    }
                }
                ;

                var optionscounty = '';
                for (var i = 0; i < citys.length; i++) {
                    if (citys[i].id == this.options.defaultCity[1] && citys[i].cid == oProvince.val()) {
                        oCity.val(citys[i].id);
                        if (this.options.showCounty) {
                            for (var j = 0; j < countys.length; j++) {
                                if (countys[j].cid == citys[i].id) {
                                    optionscounty += '<option value=' + countys[j].id + '>' + countys[j].name + '</option>';
                                }
                            }
                            oCounty.append(optionscounty).show();
                        }
                    }
                }
                ;

                if (this.options.showCounty) {
                    for (var i = 0; i < countys.length; i++) {
                        if (countys[i].id == this.options.defaultCity[2] && countys[i].cid == oCity.val()) {
                            oCounty.val(countys[i].id);
                        }
                    }
                    ;
                }
            }


            this.checkProvince = function () {
                oProvince.bind('change', function () {
                    var html = '<option value="0">请选择</option>';
                    var val = $(this).val();
                    // console.log(22, val, citys);
                    for (var i = 0; i < citys.length; i++) {
                        if (citys[i].cid == val) {
                            html += '<option value=' + citys[i].id + '>' + citys[i].name + '</option>'
                        }
                    }
                    oCity.html(html).show();
                    oCounty.html('<option value="0">请选择</option>');
                })
            };

            this.checkCounty = function () {
                oCity.bind('change', function () {
                    var html = '<option value="0">请选择</option>';

                    var val = $(this).val();
                    // console.log(11, val, countys);
                    for (var i = 0; i < countys.length; i++) {
                        if (countys[i].cid == val) {
                            html += '<option value=' + countys[i].id + '>' + countys[i].name + '</option>'
                        }
                    }
                    oCounty.html(html).show();
                })
            };

            return this.creat();
        }
    }(jQuery, window, document))

    $(function () {
        var wechatCateCode = "{$info['wechatCateCode']}"

        $('#selectItem').showCity({
            "defaultCity": [0, 0, 0]
        });
    });

    function wechat(obj) {
        var vas = $(obj).val();
        $("#wechatCateCode").val(vas);
    }
</script>
<script>
    //删除图片
    $(document).on("click", '.delSingle', function () {
        var index = $(this).index(".delSingle");
        // console.log(33, index);
        //删除图片上传框的值 解决重复上传问题
        $(".upload").eq(index).val('');
        $(".delSingle").eq(index).parents(".uploadImg").find('img.showImg').attr('src', 'https://file.wunengkeji.com/static/img/500kb.jpg').next().addClass('hide');
        $(".delSingle").eq(index).parents(".uploadImg").find('input.inputimg').val("");
        // console.log($(".delSingle").eq(index));
    });
    //放大图片
    $(document).on("click", '.fdj', function () {
        var img = $(this).attr("data-img");
        $("#img").attr("src", img);
        $('#myModal').modal('show')

    });
</script>
</html>
